home *** CD-ROM | disk | FTP | other *** search
- global hotcast, lastmc, numerocapitoli, pathSeparator, slideCounter, guardaQui, rosso, bianco, currentNetHandler, prefix
-
- on startMovie
- set rosso to the foreColor of field "rosso"
- set bianco to the foreColor of field "bianco"
- set lastmc to -1
- set hotcast to [190, 191, 192, 193, 194, 195, 196, 197, 177, 207, 208, 209, 210]
- bootstrap()
- end
-
- on initSlide
- set slideCounter to 1
- set the foreColor of field 20 to bianco
- set the foreColor of line 1 of field 20 to rosso
- set ssobj to FileIO(mnew, "read", the pathName & "Slide" & pathSeparator & "01.pct")
- set the picture of cast 46 to ssobj(mReadPICT)
- put ssobj(mdispose)
- updateStage()
- sound playFile 2, the pathName & "audio" & pathSeparator & "01.aif"
- end
-
- on getNextPict
- set the foreColor of field 20 to bianco
- set the foreColor of line slideCounter + 1 of field 20 to rosso
- put slideCounter + 1
- set slideCounter to slideCounter + 1
- if slideCounter > numerocapitoli then
- set slideCounter to numerocapitoli + 1
- else
- if slideCounter < 10 then
- set prefix to "0" & string(slideCounter)
- else
- set prefix to string(slideCounter)
- end if
- set ssobj to FileIO(mnew, "read", the pathName & "Slide" & pathSeparator & prefix & ".pct")
- set the picture of cast 46 to ssobj(mReadPICT)
- put ssobj(mdispose)
- updateStage()
- sound playFile 2, the pathName & "audio" & pathSeparator & prefix & ".aif"
- end if
- end
-
- on bootstrap
- set the itemDelimiter to TAB
- set Obj to FileIO(mnew, "read", the pathName & "config.ss")
- if not objectp(Obj) then
- alert("no oggetto" & Obj)
- end if
- set content to Obj(mReadFile)
- put Obj(mdispose)
- put line 1 of content into field "titolo"
- set numerocapitoli to value(line 2 of content)
- set the text of field "testo" to line 3 to numerocapitoli + 2 of content & RETURN
- end
-
- on vedianche
- set the text of field "vedianca" to " "
- if the machineType = 256 then
- set suffix to "win"
- else
- set suffix to "mac"
- end if
- set Obj to FileIO(mnew, "read", the pathName & "seealso." & suffix)
- if not objectp(Obj) then
- alert("no oggetto" & Obj)
- end if
- set guardaQui to Obj(mReadFile)
- put Obj(mdispose)
- repeat with a = 1 to the number of lines in guardaQui
- put item 1 of line a of guardaQui & RETURN after field "vedianca"
- end repeat
- end
-
- on placebuttons nomecast, firstsprite, numerosprites, xcoord, ycoord, deltax, deltay
- repeat with a = firstsprite to firstsprite + numerosprites - 1
- set the puppet of sprite a to 1
- set the loc of sprite a to point(xcoord + (deltax * (a - firstsprite)), ycoord + (deltay * (a - firstsprite)))
- end repeat
- end
-
- on aligntextonbuttons x, y, deltay, numsprite
- set the puppet of sprite numsprite to 1
- set the loc of sprite numsprite to point(x, y)
- set the textHeight of field the castNum of sprite numsprite to deltay
- end
-
- on gherollero
- set thismc to the mouseCast
- if lastmc = thismc then
- if getOne(hotcast, thismc) then
- mousewithin(script thismc)
- end if
- end if
- if lastmc <> thismc then
- if getOne(hotcast, lastmc) then
- mouseexit(script lastmc)
- end if
- if getOne(hotcast, thismc) then
- mouseenter(script thismc)
- end if
- set lastmc to thismc
- end if
- end
-
- on idle
- if the machineType = 256 then
- do(currentNetHandler)
- end if
- gherollero()
- end
-